import { Component, OnInit } from '@angular/core';

declare const BMap: any;
@Component({
  selector: 'map',
  template: `
    <abm-map #map [options]="options" (ready)="onReady($event)"></abm-map>
  `
})
export class MapComponent implements OnInit {

  constructor() { }

  ngOnInit() {
  }

  options: any = {enableMapClick:false};

  onReady(map: any) {
    map.centerAndZoom(new BMap.Point(116.404, 39.915), 11);
    map.setCurrentCity('北京');
    map.enableScrollWheelZoom(true);

  }

}
